package com.aivin.lint_lib_java;

import com.aivin.lint_lib_java.detector.AVLogDetector;
import com.aivin.lint_lib_java.detector.AVEnumDetector;
import com.aivin.lint_lib_java.detector.AVTextStringInCodeDetector;
import com.aivin.lint_lib_java.detector.AVThreadDetector;
import com.aivin.lint_lib_java.detector.AVToastDetector;
import com.aivin.lint_lib_java.detector.AVViewIdNameDetector;
import com.aivin.lint_lib_java.detector.AVImageFileSizeDetector;
import com.aivin.lint_lib_java.detector.AVNamingConventionDetector;
import com.aivin.lint_lib_java.detector.AVXMLHardcodedValuesDetector;
import com.android.tools.lint.client.api.IssueRegistry;
import com.android.tools.lint.detector.api.ApiKt;
import com.android.tools.lint.detector.api.Issue;

import java.util.Arrays;
import java.util.List;

/**
 * IssueRegistry 用于注册要检查的 Issue ，只有注册的Issue 才会生效
 * 在当前模块的  build.gradle 中注册
 */

public class AivinIssueRegistry extends IssueRegistry {

    @Override
    public List<Issue> getIssues() {
        return Arrays.asList(
                AVLogDetector.ISSUE,
                AVThreadDetector.ISSUE,
                AVTextStringInCodeDetector.ISSUE ,
                AVImageFileSizeDetector.ISSUE ,
                AVToastDetector.ISSUE ,
                AVNamingConventionDetector.ISSUE ,
                AVEnumDetector.ISSUE ,
                AVXMLHardcodedValuesDetector.ISSUE ,
                AVViewIdNameDetector.ISSUE
        );
    }

    /**
     * @return compiled code
     */
    @Override
    public int getApi() {
        return ApiKt.CURRENT_API;
    }


}
